package cn.tpshion.vm.common.model;

/**
 * 请求上下文
 */
public class RequestContext {

    private static final ThreadLocal<String> USERNAME = new ThreadLocal<>();

    public static void setUsername(String username){
        USERNAME.set(username);
    }

    public static String getUserName(){
        return USERNAME.get();
    }

    public static void clear(){
        USERNAME.remove();
    }
}
